﻿using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MyMES.Dto;
using MyMES.IServices;
using VOL.Entity.DomainModels.Core;
using VOL.Entity.DomainModels;

namespace VOL.WebApi.Controllers.WarehouseManagement
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class GetCustomerController : ControllerBase
    {
        private readonly ICustomerService _customerService;

        public GetCustomerController(ICustomerService customerService)
        {
            _customerService = customerService;
        }

        [HttpPost]
        public Task<PageGridData<Customer>> GetCustomer([FromBody]GetCustomerDTO dto)
        {
            return _customerService.GetCustomer(dto);
        }
    }
}
